Skip to main content

Deal events

A deal event is anything that lands on a deal's timeline: a note, a scheduled activity, or a message that is dispatched through Chatwoot or the Evolution API (WhatsApp).

There is a single endpoint, but it accepts several kinds of events. The kind field decides which fields are required, and which side effects the system runs.

Endpoint

POST /api/v1/accounts/{account_id}/deals/{deal_id}/events

Path parameterTypeRequiredDescription
account_idintegerYesAccount scope.
deal_idintegerYesThe deal that will receive the event.

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR_TOKEN_HERE

Common attributes

AttributeTypeRequiredExampleNotes
kindstringYesnoteOne of note, activity, chatwoot_message, evolution_api_message.
titlestringNoFollow-up callDefaults to empty.
contentstringMostly yesHow are you?Body of the note / activity / message.
donebooleanNotrueMarks the event as completed.
auto_donebooleanNofalseIf true, the system marks the event as done automatically (e.g. after sending a message).
done_atdatetime (UTC)No2025-01-18T15:30:00ZWhen it was completed.
scheduled_atdatetime (UTC)Sometimes2025-01-20T14:00:00ZRequired for scheduled messages.
send_nowbooleanSometimestrueRequired for "send now" messages.
app_typestringSometimesApps::ChatwootOne of Apps::Chatwoot, Apps::EvolutionApi.
app_idintegerSometimes5ID of the app integration.
additional_attributesobjectSometimes{ "chatwoot_inbox_id": "62483" }App‑specific extras.
custom_attributesobjectNo{ "channel": "whatsapp" }Free‑form custom fields.

The next sections show the exact body for each kind.


1. Create a note (kind = note)

A note is a free‑text record on the deal's timeline. No side effects.

Body

{
"kind": "note",
"content": "Text content..."
}

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/deals/1/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"kind": "note",
"content": "Called the customer to discuss next steps."
}'

Example response — 201 Created

{
"id": 88,
"deal_id": 1,
"contact_id": 1,
"app_type": null,
"app_id": null,
"kind": "note",
"scheduled_at": null,
"done_at": null,
"from_me": true,
"status": null,
"custom_attributes": {},
"additional_attributes": {},
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"title": "",
"auto_done": false,
"account_id": 1,
"done": false,
"send_now": null,
"files": [],
"files_events": [],
"invalid_files": null,
"content": "Called the customer to discuss next steps."
}

2. Create an activity (kind = activity)

An activity is a task scheduled on the timeline (a call, a meeting, a follow‑up).

Body

{
"title": "Activity example title",
"kind": "activity",
"content": "Text content...",
"scheduled_at": "2025-01-20T14:00:00Z",
"done": false
}

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/deals/1/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"title": "Follow-up call",
"kind": "activity",
"content": "Confirm proposal received",
"scheduled_at": "2025-01-20T14:00:00Z",
"done": false
}'

Example response — 201 Created

{
"id": 89,
"deal_id": 1,
"contact_id": 1,
"app_type": null,
"app_id": null,
"kind": "activity",
"scheduled_at": "2025-01-20T14:00:00Z",
"done_at": null,
"from_me": true,
"status": null,
"custom_attributes": {},
"additional_attributes": {},
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"title": "Follow-up call",
"auto_done": false,
"account_id": 1,
"done": false,
"send_now": null,
"files": [],
"files_events": [],
"invalid_files": null,
"content": "Confirm proposal received"
}

3. Schedule a Chatwoot message (kind = chatwoot_message)

Schedules a message that will be sent through a Chatwoot inbox at scheduled_at.

Body

{
"title": "Chatwoot Message",
"content": "How are you?",
"kind": "chatwoot_message",
"auto_done": false,
"scheduled_at": "2025-01-20T14:00:00Z",
"app_type": "Apps::Chatwoot",
"app_id": 6,
"additional_attributes": {
"chatwoot_inbox_id": "62483"
}
}

Required fields for this kind

AttributeRequiredNotes
kindYesMust be chatwoot_message.
contentYesMessage body.
scheduled_atYesUTC.
app_typeYesApps::Chatwoot.
app_idYesThe Chatwoot app integration ID.
additional_attributes.chatwoot_inbox_idYesTarget inbox.

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/deals/1/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"title": "Chatwoot Message",
"content": "How are you?",
"kind": "chatwoot_message",
"auto_done": false,
"scheduled_at": "2025-01-20T14:00:00Z",
"app_type": "Apps::Chatwoot",
"app_id": 6,
"additional_attributes": { "chatwoot_inbox_id": "62483" }
}'

Example response — 201 Created

{
"id": 90,
"deal_id": 1,
"contact_id": 1,
"app_type": "Apps::Chatwoot",
"app_id": 6,
"kind": "chatwoot_message",
"scheduled_at": "2025-01-20T14:00:00Z",
"done_at": null,
"from_me": true,
"status": null,
"custom_attributes": {},
"additional_attributes": { "chatwoot_inbox_id": "62483" },
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"title": "Chatwoot Message",
"auto_done": false,
"account_id": 1,
"done": false,
"send_now": null,
"files": [],
"files_events": [],
"invalid_files": null,
"content": "How are you?"
}

4. Send a Chatwoot message immediately

Same kind as above, but sent immediately by setting send_now: true.

Body

{
"title": "Chatwoot Message",
"content": "How are you?",
"kind": "chatwoot_message",
"send_now": true,
"app_type": "Apps::Chatwoot",
"app_id": 5,
"additional_attributes": {
"chatwoot_inbox_id": "62483"
}
}

Required fields for this kind

AttributeRequiredNotes
kindYeschatwoot_message.
contentYesMessage body.
send_nowYestrue.
app_typeYesApps::Chatwoot.
app_idYesChatwoot integration ID.
additional_attributes.chatwoot_inbox_idYesTarget inbox.

Example response — 201 Created

{
"id": 91,
"deal_id": 1,
"contact_id": 1,
"app_type": "Apps::Chatwoot",
"app_id": 5,
"kind": "chatwoot_message",
"scheduled_at": null,
"done_at": "2025-01-15T10:30:00Z",
"from_me": true,
"status": null,
"custom_attributes": {},
"additional_attributes": { "chatwoot_inbox_id": "62483" },
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"title": "Chatwoot Message",
"auto_done": true,
"account_id": 1,
"done": true,
"send_now": true,
"files": [],
"files_events": [],
"invalid_files": null,
"content": "How are you?"
}

5. Schedule a WhatsApp message (kind = evolution_api_message)

Schedules an Evolution API (WhatsApp) message to be sent at scheduled_at.

Body

{
"title": "Whatsapp Message",
"content": "How are you?",
"kind": "evolution_api_message",
"auto_done": false,
"scheduled_at": "2025-01-20T14:00:00Z",
"app_type": "Apps::EvolutionApi",
"app_id": 5
}

Required fields for this kind

AttributeRequiredNotes
kindYesevolution_api_message.
contentYesMessage body.
scheduled_atYesUTC.
app_typeYesApps::EvolutionApi.
app_idYesEvolution API integration ID.

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/deals/1/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"title": "Whatsapp Message",
"content": "How are you?",
"kind": "evolution_api_message",
"scheduled_at": "2025-01-20T14:00:00Z",
"app_type": "Apps::EvolutionApi",
"app_id": 5
}'

Example response — 201 Created

{
"id": 92,
"deal_id": 1,
"contact_id": 1,
"app_type": "Apps::EvolutionApi",
"app_id": 5,
"kind": "evolution_api_message",
"scheduled_at": "2025-01-20T14:00:00Z",
"done_at": null,
"from_me": true,
"status": null,
"custom_attributes": {},
"additional_attributes": {},
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"title": "Whatsapp Message",
"auto_done": false,
"account_id": 1,
"done": false,
"send_now": null,
"files": [],
"files_events": [],
"invalid_files": null,
"content": "How are you?"
}

6. Send a WhatsApp message immediately

Same kind as above, but with send_now: true.

Body

{
"title": "Whatsapp Message",
"content": "How are you?",
"kind": "evolution_api_message",
"send_now": true,
"app_type": "Apps::EvolutionApi",
"app_id": 5
}

Example request

curl -X POST "https://app.woofedcrm.com/api/v1/accounts/1/deals/1/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"title": "Whatsapp Message",
"content": "How are you?",
"kind": "evolution_api_message",
"send_now": true,
"app_type": "Apps::EvolutionApi",
"app_id": 5
}'

Example response — 201 Created

{
"id": 93,
"deal_id": 1,
"contact_id": 1,
"app_type": "Apps::EvolutionApi",
"app_id": 5,
"kind": "evolution_api_message",
"scheduled_at": null,
"done_at": "2025-01-15T10:30:00Z",
"from_me": true,
"status": null,
"custom_attributes": {},
"additional_attributes": {},
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"title": "Whatsapp Message",
"auto_done": true,
"account_id": 1,
"done": true,
"send_now": true,
"files": [],
"files_events": [],
"invalid_files": null,
"content": "How are you?"
}

Possible errors

StatusWhen
401Missing or invalid token.
404The deal does not exist in that account.
422Invalid kind, missing required field for the chosen kind, malformed scheduled_at, or unknown app_id / app_type.